import { createUUID } from '@/core';
import { PropType } from 'vue';

export const LoginCaptchaProps = {
	name: {
		type: String,
		default: '',
	},
	index: {
		type: Number,
	},
	layoutModelDetails: {
		type: Object,
		default: {},
	},
	value: {
		type: String,
		default: '',
	},
};

export const VuePuzzleCodeProps = {
	id: {
		type: String,
		default: createUUID(),
	},
	canvasWidth: {
		type: Number,
		default: 310,
	},
	canvasHeight: {
		type: Number,
		default: 160,
	},
	show: {
		type: Boolean,
		default: false,
	},
	puzzleScale: {
		type: Number,
		default: 1,
	},
	sliderSize: {
		type: Number,
		default: 50,
	},
	range: {
		type: Number,
		default: 10,
	},
	imgs: {
		type: Array as PropType<string[]>,
	},
	successText: {
		type: String,
		default: '验证通过！',
	},
	failText: {
		type: String,
		default: '验证失败，请重试',
	},
	sliderText: {
		type: String,
		default: '拖动滑块完成拼图',
	},
};
